{% load humanize %}

{% block post %}
    <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
    <p class="byline">{{ post.get_author.name }}, {{ post.pub_date|naturalday:date_format }} at {{ post.pub_date|date:time_format }}</p>
    <div class="body">{{ post.body|safe }}</div>
    <p class="tags">

    {% if post.get_tags %}
        Tagged with 
        {% for tag in post.get_tags %}
            <a href="{% url blogs.main.tag blog_slug,tag.name %}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}
        {% endfor %}
    {% else %}
        No tags
    {% endif %}
{% endblock %}

{# Hide comments for single post view #}
{% ifnotequal page_class 'post' %}| <a href="{{ post.get_absolute_url }}#comments">Comment{{ post.get_comments|pluralize }} ({{ post.get_comments|length }})</a>{% endifnotequal %}

<!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
addthis_pub             = 'i2hsu'; 
addthis_logo            = 'http://www.addthis.com/images/yourlogo.png';
addthis_logo_background = 'EFEFFF';
addthis_logo_color      = '666699';
addthis_brand           = 'GlobeCampus.ca';
addthis_options         = 'favorites, email, digg, delicious, myspace, facebook, google, live, more';
</script>
| <a class="add-this" href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', 'http://{{ domain }}{{ post.get_absolute_url }}', '{{ post.title }}')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="" /></a>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- ADDTHIS BUTTON END -->

{# If user is an admin, show the edit link #}
{% if is_admin %}| <a href="{% url blogs.admin.post_edit blog_slug,post.slug %}?back={% url blogs.main.index blog_slug %}">Edit this post</a>{% endif %}</p>
